﻿<%@ Page Title="" Language="C#" MasterPageFile="~/back/Site.master" AutoEventWireup="true"
    CodeFile="AddUser.aspx.cs" Inherits="back_AddUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('[data-rel="chosen"],[rel="chosen"]').chosen();
        });

        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode;
            if (charCode != 46 && charCode > 31
            && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
    </script>
    <div class="page-header">
        <h1>
            Add User</h1>
    </div>
    <div  id="divMessage" runat="server">
    </div>
    <div class="control-group">
        <label class="control-label">
            First Name</label>
        <div class="controls">
            <asp:TextBox ID="txtFirstName" runat="server" CssClass="input-xlarge"></asp:TextBox>
            <asp:RequiredFieldValidator ID="rfvFirstname" runat="server" ErrorMessage="*" ControlToValidate="txtFirstName"
                ForeColor="Red" Display="Dynamic" ValidationGroup="Register"></asp:RequiredFieldValidator>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            Middle Name</label>
        <div class="controls">
            <asp:TextBox ID="txtMiddleName" runat="server" CssClass="input-xlarge"></asp:TextBox>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            Last Name</label>
        <div class="controls">
            <asp:TextBox ID="txtLastName" runat="server" CssClass="input-xlarge"></asp:TextBox>
            <asp:RequiredFieldValidator ID="rfvLastName" runat="server" ErrorMessage="*" ControlToValidate="txtLastName"
                ForeColor="Red" Display="Dynamic" ValidationGroup="Register"></asp:RequiredFieldValidator>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            Email</label>
        <div class="controls">
            <asp:TextBox ID="txtEmailId" runat="server" CssClass="input-xlarge"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                ForeColor="Red" ControlToValidate="txtEmailId" Display="Dynamic" ValidationGroup="Register"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationGroup="Register"
                ForeColor="Red" ErrorMessage="Invalid emial address." ControlToValidate="txtEmailId"
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            Phone</label>
        <div class="controls">
            <asp:TextBox ID="txtPhoneNo" runat="server" CssClass="input-xlarge" onkeypress="return isNumberKey(event)"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                ForeColor="Red" ControlToValidate="txtPhoneNo" Display="Dynamic" ValidationGroup="Register"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" ForeColor="Red"
                runat="server" ErrorMessage="Allow only numbers." ValidationGroup="Register"
                ControlToValidate="txtPhoneNo" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            Address 1</label>
        <div class="controls">
            <asp:TextBox ID="txtAddress1" runat="server" CssClass="input-xlarge"></asp:TextBox>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            Address 2</label>
        <div class="controls">
            <asp:TextBox ID="txtAddress2" runat="server" CssClass="input-xlarge"></asp:TextBox>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            Country</label>
        <div class="controls">
            <%--<asp:TextBox ID="txtCountry" runat="server" CssClass="input-xlarge"></asp:TextBox>--%>
            <asp:DropDownList ID="drpCountry" runat="server" data-rel="chosen"></asp:DropDownList>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            State</label>
        <div class="controls">
            <%--<asp:TextBox ID="txtState" runat="server" CssClass="input-xlarge"></asp:TextBox>--%>
            <asp:DropDownList ID="drpState" runat="server" data-rel="chosen"></asp:DropDownList>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            City</label>
        <div class="controls">
            <asp:TextBox ID="txtCity" runat="server" CssClass="input-xlarge"></asp:TextBox>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            UserName</label>
        <div class="controls">
            <asp:TextBox ID="txtUserName" runat="server" CssClass="input-xlarge"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*"
                ForeColor="Red" ControlToValidate="txtUserName" Display="Dynamic" ValidationGroup="Register"></asp:RequiredFieldValidator>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">
            Password</label>
        <div class="controls">
            <asp:TextBox ID="txtPassword" TextMode="Password" runat="server" CssClass="input-xlarge"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*"
                ForeColor="Red" ControlToValidate="txtPassword" Display="Dynamic" ValidationGroup="Register"></asp:RequiredFieldValidator>
        </div>
    </div>
    <div class="form-actions">
        <asp:Button ID="btnSubmit" runat="server" CssClass="btn btn-primary" Text="Submit"
            OnClick="btnSubmit_Click" ValidationGroup="Register" />
    </div>
</asp:Content>
